Skip to content

Add support for Lilya#420

Open
tarsil wants to merge 2 commits into0b01001001:mainfrom
tarsil:feat/support_for_lilya
Open

Add support for Lilya#420
tarsil wants to merge 2 commits into0b01001001:mainfrom
tarsil:feat/support_for_lilya

Conversation

@tarsil
Copy link

@tarsil tarsil commented Jun 4, 2025

This is a great tool and I used in the past, so it would be nice to also support Lilya.

Lilya: https://lilya.dev

@tarsil tarsil requested a review from kemingy as a code owner June 4, 2025 13:20
@kemingy
Copy link
Member

kemingy commented Jun 4, 2025

This is a great tool and I used in the past, so it would be nice to also support Lilya.

Lilya: https://lilya.dev

Hi @tarsil, thanks for your contribution. Does Lilya support pypy?

@tarsil
Copy link
Author

tarsil commented Jun 4, 2025

This is a great tool and I used in the past, so it would be nice to also support Lilya.
Lilya: https://lilya.dev

Hi @tarsil, thanks for your contribution. Does Lilya support pypy?

Lilya in theory follows the same guidelines as Starlette so I do think so? Also, I don't understand the CI issue that passed on my local

@kemingy
Copy link
Member

kemingy commented Jun 5, 2025

Lilya in theory follows the same guidelines as Starlette so I do think so? Also, I don't understand the CI issue that passed on my local

I tried this locally with pypy3.9, it failed with the same error as the CI.

____________________________________________ ERROR collecting tests/test_plugin_lilya.py _____________________________________________
tests/test_plugin_lilya.py:6: in <module>
    from lilya.apps import Lilya
.venv/lib/pypy3.9/site-packages/lilya/apps.py:19: in <module>
    from lilya.middleware.exceptions import ExceptionMiddleware
.venv/lib/pypy3.9/site-packages/lilya/middleware/exceptions.py:7: in <module>
    from lilya._internal._exception_handlers import (
.venv/lib/pypy3.9/site-packages/lilya/_internal/_exception_handlers.py:12: in <module>
    from lilya.responses import JSONResponse
.venv/lib/pypy3.9/site-packages/lilya/responses.py:41: in <module>
    from lilya.encoders import ENCODER_TYPES, EncoderProtocol, MoldingProtocol, json_encode
.venv/lib/pypy3.9/site-packages/lilya/encoders.py:1: in <module>
    from lilya._internal._encoders import (
.venv/lib/pypy3.9/site-packages/lilya/_internal/_encoders.py:208: in <module>
    TransparentCage(globals(), name="ENCODER_TYPES")
E   TypeError: TransparentCage.__init__() takes exactly one argument (the instance to initialize)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 259 warnings, 1 error in 1.97s ===================================================
make: *** [Makefile:16: test] Error 2

@tarsil
Copy link
Author

tarsil commented Jun 5, 2025

Lilya in theory follows the same guidelines as Starlette so I do think so? Also, I don't understand the CI issue that passed on my local

I tried this locally with pypy3.9, it failed with the same error as the CI.

____________________________________________ ERROR collecting tests/test_plugin_lilya.py _____________________________________________
tests/test_plugin_lilya.py:6: in <module>
    from lilya.apps import Lilya
.venv/lib/pypy3.9/site-packages/lilya/apps.py:19: in <module>
    from lilya.middleware.exceptions import ExceptionMiddleware
.venv/lib/pypy3.9/site-packages/lilya/middleware/exceptions.py:7: in <module>
    from lilya._internal._exception_handlers import (
.venv/lib/pypy3.9/site-packages/lilya/_internal/_exception_handlers.py:12: in <module>
    from lilya.responses import JSONResponse
.venv/lib/pypy3.9/site-packages/lilya/responses.py:41: in <module>
    from lilya.encoders import ENCODER_TYPES, EncoderProtocol, MoldingProtocol, json_encode
.venv/lib/pypy3.9/site-packages/lilya/encoders.py:1: in <module>
    from lilya._internal._encoders import (
.venv/lib/pypy3.9/site-packages/lilya/_internal/_encoders.py:208: in <module>
    TransparentCage(globals(), name="ENCODER_TYPES")
E   TypeError: TransparentCage.__init__() takes exactly one argument (the instance to initialize)
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================== 259 warnings, 1 error in 1.97s ===================================================
make: *** [Makefile:16: test] Error 2

Thank you, we are analysing what is happening and why 3.9 only. The rest, great job. I really love your library

@kemingy
Copy link
Member

kemingy commented Jun 5, 2025

Just tried pypy3.11, which is the latest pypy version. It failed, too.

Personally, I won't ask Lilya to support pypy, it's only a good-to-have feature. So if it's troublesome to support, I'm okay to skip the pypy test for Lilya.

@tarsil
Copy link
Author

tarsil commented Jun 5, 2025

This is more of a package dependency (monkay) than lilya. Monkay is our lazy settings system. I asked one of the maintainers to have a look. Let's see what he says but it would be nice to have Spectree supporting lilya indeed

@tarsil
Copy link
Author

tarsil commented Jun 9, 2025

Just tried pypy3.11, which is the latest pypy version. It failed, too.

Personally, I won't ask Lilya to support pypy, it's only a good-to-have feature. So if it's troublesome to support, I'm okay to skip the pypy test for Lilya.

@kemingy lilya might support pypy but for this specific case it would require some other extras that at the moment we don't see it as worth it for pypy specific. Is it ok to skip it?

@kemingy
Copy link
Member

kemingy commented Jun 9, 2025

I'm ok to skip it. You can configure the pytest to skip the test for pypy lilya.

@tarsil
Copy link
Author

tarsil commented Jun 15, 2025

@kemingy apologies as I have been extremely busy last week. Where can I actually disable this?

@kemingy
Copy link
Member

kemingy commented Jun 15, 2025

@kemingy apologies as I have been extremely busy last week. Where can I actually disable this?

I'm not an export of pytest. You can ask GPT for more details about this.

Refer: https://docs.pytest.org/en/stable/reference/reference.html#globalvar-pytestmark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants